#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2018/1/19 0019 10:36
# @Author  : Arliki
# @email   : hkdnxycz@outlook.com
# @File    : ip_test

import scrapy


class ip_t(scrapy.Spider):
    def __init__(self):
        self.headers = {
            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
            'Accept-Encoding': 'gzip, deflate',
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'
        }

    name = "ip_i"
    allowed_domains = ["baidu.com"]
    start_urls = ['http://www.baidu.com']

    def parse(self, response):
        print(response.body)
